
import requestProxy from '@/utils/request';
const { request } = requestProxy;

// 萌力-IP形象列表s
export function getIpImageList(params) {
  return request({
    url: '/admin/mengli/ipImage/list',
    method: 'get',
    params
  });
}

// 萌力-客户管理-客户列表
export function getClientList(params) {
  return request({
    url: '/admin/mengli/client/list',
    method: 'get',
    params
  });
}
// 萌力星球-供应商管理列表
export function getMengliSuppliers(params) {
  return request({
    url: '/admin/mengli/suppliers',
    method: 'get',
    params
  });
}

// 萌力订单新增-商务订单订单
export function getipLicense(params) {
  return request({
    url: '/admin/mengli/ipLicense/detail/' + params.id,
    method: 'get',
    params
  });
}
export function createMengliIpOrder(data) {
  return request({
    url: '/admin/mengli/ipLicense/create',
    method: 'post',
    data
  });
}
export function editMengliIpOrder(data) {
  return request({
    url: '/admin/mengli/ipLicense/edit',
    method: 'put',
    data
  });
}

// 萌力订单新建-表情包
export function getEmoji(params) {
  return request({
    url: '/admin/mengli/emoji/detail/' + params.id,
    method: 'get',
    params
  });
}
export function createEmojiOrder(data) {
  return request({
    url: '/admin/mengli/emoji/create',
    method: 'post',
    data
  });
}
export function editEmojiOrder(data) {
  return request({
    url: '/admin/mengli/emoji/edit',
    method: 'put',
    data
  });
}

// 收入信息
export function getIncomeList(params) {
  return request({
    url: '/admin/mengli/ipLicense/income/list',
    method: 'get',
    params
  });
}
export function getIncomeCostList(params) {
  return request({
    url: '/admin/mengli/ipLicense/costList',
    method: 'get',
    params
  });
}

export function deleteIncomeList(params) {
  return request({
    url: '/admin/mengli/ipLicense/income/delete/' + params.id,
    method: 'delete'
  });
}
export function addSharingPrice(data) {
  return request({
    url: '/admin/mengli/ipLicense/income/add',
    method: 'post',
    data
  });
}
export function editSharingPrice(data) {
  return request({
    url: '/admin/mengli/ipLicense/income/edit',
    method: 'put',
    data
  });
}
export function deleteSharingPrice(data) {
  return request({
    url: '/admin/mengli/ipLicense/income/delete/' + data.id,
    method: 'delete'
  });
}

export function contractAndinvoiceInfo(data) {
  return request({
    url: '/admin/mengli/contractAndinvoiceInfo',
    method: 'post',
    data
  });
}

export function getLog(params) {
  return request({
    url: '/admin/mengliOrder/log',
    method: 'get',
    params
  });
}
export function setLogRemarks(data) {
  return request({
    url: '/admin/mengliOrder/log/remarks',
    method: 'post',
    data
  });
}

export function addPhase(data) {
  return request({
    url: '/admin/mengli/ipLicense/add/phase/' + data.id,
    method: 'post',
    data
  });
}

// 收入项-ip授权订单-增删改
export function addIpIncomeList(data) {
  return request({
    url: 'admin/mengli/ipLicense/incomeList/create',
    method: 'post',
    data
  });
}
export function editIpIncomeList(data) {
  return request({
    url: 'admin/mengli/ipLicense/incomeList/edit',
    method: 'put',
    data
  });
}
export function deleteIpIncomeList(data) {
  return request({
    url: 'admin/mengli/ipLicense/incomeList/delete/' + data.id,
    method: 'delete'
  });
}
// 收入项-商务订单-增删改
export function addEmojiIncomeList(data) {
  return request({
    url: 'admin/mengli/emoji/incomeList/create',
    method: 'post',
    data
  });
}
export function editEmojiIncomeList(data) {
  return request({
    url: 'admin/mengli/emoji/incomeList/edit',
    method: 'put',
    data
  });
}
export function deleteEmojiIncomeList(data) {
  return request({
    url: 'admin/mengli/emoji/incomeList/delete/' + data.id,
    method: 'delete'
  });
}
// 萌力-电商订单线上-IP形象修改
export function editCommerceIp(data) {
  return request({
    url: `admin/mengli/commerce/online/${data.id}`,
    method: 'put',
    data
  });
}
// 萌力星球订单配置项
export function getOrderConfig(params) {
  return request({
    url: 'admin/mengli/orderConfig',
    method: 'get',
    params
  });
}
// 审批收入列表
export function approvelIncomeItem(data) {
  return request({
    url: `admin/mengli/ipLicense/incomeList/approval`,
    method: 'post',
    data
  });
}

export function getIpIncomeList(params) {
  return request({
    url: 'admin/mengli/ipLicense/incomeList/list/' + params.id,
    method: 'get',
    params
  });
}

// 编辑收入项获取关联成本
export function getRelatedCost(params) {
  return request({
    url: 'admin/mengli/getRelatedCost',
    method: 'get',
    params
  });
}

// 编辑成本获取关联收入项
export function getRelatedIncome(params) {
  return request({
    url: 'admin/mengli/getRelatedIncome',
    method: 'get',
    params
  });
}
